#ifndef HPLCTIMEPROGRAMDEFINE_H
#define HPLCTIMEPROGRAMDEFINE_H

#include <QObject>

#define HPLC_TIME_PROGRAM_PUMP_COUNT  (4)

struct PumpUnit
{
    double              time; // s
    double              flow;
    double              percent[HPLC_TIME_PROGRAM_PUMP_COUNT];

    PumpUnit()
    {
        reset();
    }

    void reset()
    {
        time = 0;
        flow = 0;
        for (int i = 0; i < HPLC_TIME_PROGRAM_PUMP_COUNT; i++)
            percent[i] = 100;
    }
};

struct DetectorUnit
{
    quint16     wave;
    quint16     wave2;
    quint8      range;
    bool        isZero;

    DetectorUnit()
    {
        reset();
    }

    void reset()
    {
        wave = 0;
        wave2 = 0;
        range = 0;
        isZero = false;
    }
};

struct TimeProgramUnit
{
    PumpUnit pump;
    DetectorUnit detector;
};

Q_DECLARE_METATYPE(PumpUnit)
Q_DECLARE_METATYPE(DetectorUnit)
Q_DECLARE_METATYPE(TimeProgramUnit)
Q_DECLARE_METATYPE(QList<TimeProgramUnit>)

#endif // HPLCTIMEPROGRAMDEFINE_H
